﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="EditAtricle.ascx.cs" Inherits="Views_Articles_EditAtricle" %>
<%@ Register Src="../Categories/List.ascx" TagName="ListCategory" TagPrefix="uc" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<script language="javascript" type="text/javascript">
	function historyBack() {
		if (confirm('确认要取消么？当前编辑的内容无法被保存。')) {
			window.history.back();
		}
	}

	function checkEnter(e) {
		var keynum;

		if (window.event)	// IE
		{
			keynum = e.keyCode;
		}
		else if (e.which)	// Netscape/Firefox/Opera
		{
			keynum = e.which;
		}

		if (keynum == 13)
			(document.getElementById("<%=btn_Sub.ClientID %>")).focus();
	}
</script>

<div class="HomeRightTitle">
	<div class="RightTitleCH">
		<asp:Literal ID="lit_MainTitle" runat="server" Text="修改文章"></asp:Literal>
	</div>
	<div class="RightTitleEN">
		<asp:Literal ID="lit_SubTitle" runat="server" Text="Frontfree"></asp:Literal>
	</div>
</div>
<div id="DetailBodyRightMain" class="MinHeight_500">
	<table id="AddAtricleTable" class="Fon_12" cellspacing="5">
		<tr>
			<td valign="top" class="TextAlign_R">
				<a>文章标题：</a>
			</td>
			<td>
				<asp:TextBox runat="server" ID="tb_ArticleTitle" CssClass="Width_50pc" onKeyDown="checkEnter(event)"
					MaxLength="100"></asp:TextBox>
				<asp:RequiredFieldValidator ID="valr_Title" runat="server" ForeColor="red" ControlToValidate="tb_ArticleTitle"
					ErrorMessage="(请输入标题)" Display="Dynamic" ValidationGroup="EditArticle"></asp:RequiredFieldValidator>
			</td>
		</tr>
		<tr>
			<td valign="top" class="TextAlign_R">
				<a>作者：</a>
			</td>
			<td>
				<asp:TextBox runat="server" ID="tb_Author" CssClass="Width_50pc" onKeyDown="checkEnter(event)"></asp:TextBox>
				<asp:RequiredFieldValidator ID="valr_Author" runat="server" ForeColor="red" ControlToValidate="tb_Author"
					ErrorMessage="(请输入作者)" Display="Dynamic" ValidationGroup="EditArticle"></asp:RequiredFieldValidator>
			</td>
		</tr>
		<tr>
			<td valign="top" class="TextAlign_R">
				<a>类别：</a>
			</td>
			<td>
				<div class="CategoryList" onkeydown="checkEnter(event)">
					<uc:ListCategory ID="uc_ListCategory" runat="server" />
				</div>
			</td>
		</tr>
		<tr>
			<td valign="top" class="TextAlign_R">
				<a>文章摘要：</a>
			</td>
			<td>
				<asp:TextBox runat="server" ID="tb_Summary" Height="120px" Width="600px" TextMode="MultiLine"
					MaxLength="200"></asp:TextBox>
			</td>
		</tr>
		<tr>
			<td valign="top" class="TextAlign_R">
				<a>正文内容：</a>
			</td>
			<td>
				<FCKeditorV2:FCKeditor ID="fck_Content" runat="server" Width="100%" Height="600">
				</FCKeditorV2:FCKeditor>
			</td>
		</tr>
		<tr>
			<td valign="top" class="TextAlign_R">
				<a>Tags：</a>
			</td>
			<td>
				<asp:TextBox runat="server" ID="tb_Tags" CssClass="Width_100pc" onKeyDown="checkEnter(event)"></asp:TextBox>
			</td>
		</tr>
		<tr>
			<td>
			</td>
			<td>
				<div style="float: left">
					<asp:Button runat="server" ID="btn_Sub" Text="提交" CssClass="Btn_60" ValidationGroup="EditArticle" />
				</div>
				<div style="float: left; padding-left: 20px;">
					<input id="btn_Cancel" type="button" value="取消" onclick="historyBack();" class="Btn_60" />
				</div>
				<div style="float: left; padding-left: 20px;">
					<asp:Button runat="server" ID="btn_Draft" Text="保存为草稿" CssClass="Btn_100" />
				</div>
			</td>
		</tr>
	</table>
</div>
